<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'open29.ru',
	'defaultController'=>'site',
	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
        'application.extensions.yiidebugtb.*',
	),

	// application components
	'components'=>array(

            'widgetFactory'=>array(
                'enableSkin'=>true,
            'skinnableWidgets'=>array(                
               
                ),
                 
                ),

		'user'=>array(
			'class'=>'WebUser',
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),
		
		'authManager'=>array(
		'class'=>'PhpAuthManager',
		'defaultRoles'=>array('guest')
		),
		// uncomment the following to enable URLs in path-format
		
		'urlManager'=>array(
			'urlFormat'=>'path',
			'showScriptName'=>'False',
			'rules'=>array(
			'alert/automarket/<type>/<typedeal>'=>'alert/automarket/type/<type>/typedeal/<typedeal>',
			'alert/autoaist/<type>/<typedeal>/<mark>'=>'alert/automarket/type/<type>/typedeal/<typedeal>/mark/<mark>',
			'alert/catsell/<type>'=>'alert/catsell/type/<type>',
			'afisha/tag/<tag>'=>'afisha/tag/tag/<tag>',
			
			'news/type/<type>'=>'news/type/type/<type>',
			'news/category/<cat>'=>'news/category/cat/<cat>',
			'afisha/date/<date>'=>'afisha/date/date/<date>',
				'<controller:\w+>/<id:\d+>'=>'<controller>/test',
				
				
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		
		'db'=>array(
			//'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
		),
		// uncomment the following to use a MySQL database
		
		'db'=>array(
			   'connectionString' => 'mysql:host=localhost;dbname=istud',
			   'emulatePrepare' => true,
			   'username' => 'root',
			   'password' => 'kolvzad',
			   'charset' => 'utf8',
			  ),
		
		'errorHandler'=>array(
			// use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning, trace',
				),
				// uncomment the following to show log messages on web pages				
				/*array(
					'class'=>'XWebDebugRouter',
                    'config'=>'alignLeft, opaque, runInDebug, fixedPos, collapsed, yamlStyle',
                    'levels'=>'error, warning, trace, profile, info',
				),	*/
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	),
);
